package javao.cn.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javao.cn.common.util.R;
import javao.cn.controller.form.TestSayHelloForm;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @auther admin闫
 * @Descriptopn
 * @date 2024/5/29 14:17
 */
@RestController
@RequestMapping("/test")
@Api("测试Web接口")
public class TestController {

    @PostMapping("/sayHello")
    @ApiOperation("最简单的测试方法")
    public R sayHello(@Valid @RequestBody TestSayHelloForm form){
        return R.ok().put("message","Hello,"+form.getName());
    }
}

